const { MilvusClient,DataType } = require('@zilliz/milvus2-sdk-node');
//创建客户端
const milvusClient = new MilvusClient({
    address: 'localhost:19530',
    timeout: 100000
})
const db_name = 'blog';
const collection_name = 'articles';
const field_name ='title_vector';
(async function () {
    try {
        await milvusClient.useDatabase(db_name);
         const result = await milvusClient.search({
            collection_name,
            vector:[0.699999988079071,0.800000011920929,0.8999999761581421],
            field_name,
            limit:10,
            output_fields:['id','title']
        })
        console.log(result)
    } catch (error) {
        await milvusClient.closeConnection();
        process.exit(1)
    }

})()